home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / pcq_incl3v1.lha / Graphics / ModeID.i < prev    next >
Encoding:
Text File  |  1994-10-12  |  15.3 KB  |  363 lines

  1.    {   include define file for graphics display mode IDs.   }
  2.  
  3. {$I "Include:Graphics/DisplayInfo.i"}
  4.  
  5. const
  6.  
  7.    INVALID_ID                   =   NOT 0;
  8.  
  9. { With all the new modes that are available under V38 and V39, it is highly
  10.  * recommended that you use either the asl.library screenmode requester,
  11.  * and/or the V39 graphics.library function BestModeIDA().
  12.  *
  13.  * DO NOT interpret the any of the bits in the ModeID for its meaning. For
  14.  * example, do not interpret bit 3 ($4) as meaning the ModeID is interlaced.
  15.  * Instead, use GetDisplayInfoData() with DTAG_DISP, and examine the DIPF_...
  16.  * flags to determine a ModeID's characteristics. The only exception to
  17.  * this rule is that bit 7 ($80) will always mean the ModeID is
  18.  * ExtraHalfBright, and bit 11 ($800) will always mean the ModeID is HAM.
  19.  }
  20.  
  21. { normal identifiers }
  22.  
  23.    MONITOR_ID_MASK              =   $FFFF1000;
  24.  
  25.    DEFAULT_MONITOR_ID           =   $00000000;
  26.    NTSC_MONITOR_ID              =   $00011000;
  27.    PAL_MONITOR_ID               =   $00021000;
  28.  
  29. { the following 22 composite keys are for Modes on the default Monitor.
  30.  * NTSC & PAL "flavors" of these particular keys may be made by or'ing
  31.  * the NTSC or PAL MONITOR_ID with the desired MODE_KEY...
  32.  *
  33.  * For example, to specifically open a PAL HAM interlaced ViewPort
  34.  * (or intuition screen), you would use the modeid of
  35.  * (PAL_MONITOR_ID OR HAMLACE_KEY)
  36.  }
  37.  
  38.    LORES_KEY                     =  $00000000;
  39.    HIRES_KEY                     =  $00008000;
  40.    SUPER_KEY                     =  $00008020;
  41.    HAM_KEY                       =  $00000800;
  42.    LORESLACE_KEY                 =  $00000004;
  43.    HIRESLACE_KEY                 =  $00008004;
  44.    SUPERLACE_KEY                 =  $00008024;
  45.    HAMLACE_KEY                   =  $00000804;
  46.    LORESDPF_KEY                  =  $00000400;
  47.    HIRESDPF_KEY                  =  $00008400;
  48.    SUPERDPF_KEY                  =  $00008420;
  49.    LORESLACEDPF_KEY              =  $00000404;
  50.    HIRESLACEDPF_KEY              =  $00008404;
  51.    SUPERLACEDPF_KEY              =  $00008424;
  52.    LORESDPF2_KEY                 =  $00000440;
  53.    HIRESDPF2_KEY                 =  $00008440;
  54.    SUPERDPF2_KEY                 =  $00008460;
  55.    LORESLACEDPF2_KEY             =  $00000444;
  56.    HIRESLACEDPF2_KEY             =  $00008444;
  57.    SUPERLACEDPF2_KEY             =  $00008464;
  58.    EXTRAHALFBRITE_KEY            =  $00000080;
  59.    EXTRAHALFBRITELACE_KEY        =  $00000084;
  60. { New for AA ChipSet (V39) }
  61.    HIRESHAM_KEY                  =  $00008800;
  62.    SUPERHAM_KEY                  =  $00008820;
  63.    HIRESEHB_KEY                  =  $00008080;
  64.    SUPEREHB_KEY                  =  $000080a0;
  65.    HIRESHAMLACE_KEY              =  $00008804;
  66.    SUPERHAMLACE_KEY              =  $00008824;
  67.    HIRESEHBLACE_KEY              =  $00008084;
  68.    SUPEREHBLACE_KEY              =  $000080a4;
  69. { Added for V40 - may be useful modes for some games or animations. }
  70.    LORESSDBL_KEY                 =  $00000008;
  71.    LORESHAMSDBL_KEY              =  $00000808;
  72.    LORESEHBSDBL_KEY              =  $00000088;
  73.    HIRESHAMSDBL_KEY              =  $00008808;
  74.  
  75.  
  76. { VGA identifiers }
  77.  
  78.    VGA_MONITOR_ID                =  $00031000;
  79.  
  80.    VGAEXTRALORES_KEY             =  $00031004;
  81.    VGALORES_KEY                  =  $00039004;
  82.    VGAPRODUCT_KEY                =  $00039024;
  83.    VGAHAM_KEY                    =  $00031804;
  84.    VGAEXTRALORESLACE_KEY         =  $00031005;
  85.    VGALORESLACE_KEY              =  $00039005;
  86.    VGAPRODUCTLACE_KEY            =  $00039025;
  87.    VGAHAMLACE_KEY                =  $00031805;
  88.    VGAEXTRALORESDPF_KEY          =  $00031404;
  89.    VGALORESDPF_KEY               =  $00039404;
  90.    VGAPRODUCTDPF_KEY             =  $00039424;
  91.    VGAEXTRALORESLACEDPF_KEY      =  $00031405;
  92.    VGALORESLACEDPF_KEY           =  $00039405;
  93.    VGAPRODUCTLACEDPF_KEY         =  $00039425;
  94.    VGAEXTRALORESDPF2_KEY         =  $00031444;
  95.    VGALORESDPF2_KEY              =  $00039444;
  96.    VGAPRODUCTDPF2_KEY            =  $00039464;
  97.    VGAEXTRALORESLACEDPF2_KEY     =  $00031445;
  98.    VGALORESLACEDPF2_KEY          =  $00039445;
  99.    VGAPRODUCTLACEDPF2_KEY        =  $00039465;
  100.    VGAEXTRAHALFBRITE_KEY         =  $00031084;
  101.    VGAEXTRAHALFBRITELACE_KEY     =  $00031085;
  102. { New for AA ChipSet (V39) }
  103.    VGAPRODUCTHAM_KEY             =  $00039824;
  104.    VGALORESHAM_KEY               =  $00039804;
  105.    VGAEXTRALORESHAM_KEY          =  VGAHAM_KEY;
  106.    VGAPRODUCTHAMLACE_KEY         =  $00039825;
  107.    VGALORESHAMLACE_KEY           =  $00039805;
  108.    VGAEXTRALORESHAMLACE_KEY      =  VGAHAMLACE_KEY;
  109.    VGAEXTRALORESEHB_KEY          =  VGAEXTRAHALFBRITE_KEY;
  110.    VGAEXTRALORESEHBLACE_KEY      =  VGAEXTRAHALFBRITELACE_KEY;
  111.    VGALORESEHB_KEY               =  $00039084;
  112.    VGALORESEHBLACE_KEY           =  $00039085;
  113.    VGAEHB_KEY                    =  $000390a4;
  114.    VGAEHBLACE_KEY                =  $000390a5;
  115. { These ModeIDs are the scandoubled equivalents of the above, with the
  116.  * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  117.  * dualplayfield.
  118.  }
  119.    VGAEXTRALORESDBL_KEY          =  $00031000;
  120.    VGALORESDBL_KEY               =  $00039000;
  121.    VGAPRODUCTDBL_KEY             =  $00039020;
  122.    VGAEXTRALORESHAMDBL_KEY       =  $00031800;
  123.    VGALORESHAMDBL_KEY            =  $00039800;
  124.    VGAPRODUCTHAMDBL_KEY          =  $00039820;
  125.    VGAEXTRALORESEHBDBL_KEY       =  $00031080;
  126.    VGALORESEHBDBL_KEY            =  $00039080;
  127.    VGAPRODUCTEHBDBL_KEY          =  $000390a0;
  128.  
  129. { a2024 identifiers }
  130.  
  131.    A2024_MONITOR_ID              =  $00041000;
  132.  
  133.    A2024TENHERTZ_KEY             =  $00041000;
  134.    A2024FIFTEENHERTZ_KEY         =  $00049000;
  135.  
  136. { prototype identifiers (private) }
  137.  
  138.    PROTO_MONITOR_ID              =  $00051000;
  139.  
  140.  
  141. { These monitors and modes were added for the V38 release. }
  142.  
  143.    EURO72_MONITOR_ID             =  $00061000;
  144.  
  145.    EURO72EXTRALORES_KEY          =  $00061004;
  146.    EURO72LORES_KEY               =  $00069004;
  147.    EURO72PRODUCT_KEY             =  $00069024;
  148.    EURO72HAM_KEY                 =  $00061804;
  149.    EURO72EXTRALORESLACE_KEY      =  $00061005;
  150.    EURO72LORESLACE_KEY           =  $00069005;
  151.    EURO72PRODUCTLACE_KEY         =  $00069025;
  152.    EURO72HAMLACE_KEY             =  $00061805;
  153.    EURO72EXTRALORESDPF_KEY       =  $00061404;
  154.    EURO72LORESDPF_KEY            =  $00069404;
  155.    EURO72PRODUCTDPF_KEY          =  $00069424;
  156.    EURO72EXTRALORESLACEDPF_KEY   =  $00061405;
  157.    EURO72LORESLACEDPF_KEY        =  $00069405;
  158.    EURO72PRODUCTLACEDPF_KEY      =  $00069425;
  159.    EURO72EXTRALORESDPF2_KEY      =  $00061444;
  160.    EURO72LORESDPF2_KEY           =  $00069444;
  161.    EURO72PRODUCTDPF2_KEY         =  $00069464;
  162.    EURO72EXTRALORESLACEDPF2_KEY  =  $00061445;
  163.    EURO72LORESLACEDPF2_KEY       =  $00069445;
  164.    EURO72PRODUCTLACEDPF2_KEY     =  $00069465;
  165.    EURO72EXTRAHALFBRITE_KEY      =  $00061084;
  166.    EURO72EXTRAHALFBRITELACE_KEY  =  $00061085;
  167. { New AA modes (V39) }
  168.    EURO72PRODUCTHAM_KEY          =  $00069824;
  169.    EURO72PRODUCTHAMLACE_KEY      =  $00069825;
  170.    EURO72LORESHAM_KEY            =  $00069804;
  171.    EURO72LORESHAMLACE_KEY        =  $00069805;
  172.    EURO72EXTRALORESHAM_KEY       =  EURO72HAM_KEY;
  173.    EURO72EXTRALORESHAMLACE_KEY   =  EURO72HAMLACE_KEY ;
  174.    EURO72EXTRALORESEHB_KEY       =  EURO72EXTRAHALFBRITE_KEY;
  175.    EURO72EXTRALORESEHBLACE_KEY   =  EURO72EXTRAHALFBRITELACE_KEY;
  176.    EURO72LORESEHB_KEY            =  $00069084;
  177.    EURO72LORESEHBLACE_KEY        =  $00069085;
  178.    EURO72EHB_KEY                 =  $000690a4;
  179.    EURO72EHBLACE_KEY             =  $000690a5;
  180. { These ModeIDs are the scandoubled equivalents of the above, with the
  181.  * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  182.  * dualplayfield.
  183.  }
  184.    EURO72EXTRALORESDBL_KEY       =  $00061000;
  185.    EURO72LORESDBL_KEY            =  $00069000;
  186.    EURO72PRODUCTDBL_KEY          =  $00069020;
  187.    EURO72EXTRALORESHAMDBL_KEY    =  $00061800;
  188.    EURO72LORESHAMDBL_KEY         =  $00069800;
  189.    EURO72PRODUCTHAMDBL_KEY       =  $00069820;
  190.    EURO72EXTRALORESEHBDBL_KEY    =  $00061080;
  191.    EURO72LORESEHBDBL_KEY         =  $00069080;
  192.    EURO72PRODUCTEHBDBL_KEY       =  $000690a0;
  193.  
  194.  
  195.    EURO36_MONITOR_ID             =  $00071000;
  196.  
  197. { Euro36 modeids can be ORed with the default modeids a la NTSC and PAL.
  198.  * For example, Euro36 SuperHires is
  199.  * (EURO36_MONITOR_ID OR SUPER_KEY)
  200.  }
  201.  
  202.    SUPER72_MONITOR_ID            =  $00081000;
  203.  
  204. { Super72 modeids can be ORed with the default modeids a la NTSC and PAL.
  205.  * For example, Super72 SuperHiresLace (80$600) is
  206.  * (SUPER72_MONITOR_ID OR SUPERLACE_KEY).
  207.  * The following scandoubled Modes are the exception:
  208.  }
  209.    SUPER72LORESDBL_KEY           =  $00081008;
  210.    SUPER72HIRESDBL_KEY           =  $00089008;
  211.    SUPER72SUPERDBL_KEY           =  $00089028;
  212.    SUPER72LORESHAMDBL_KEY        =  $00081808;
  213.    SUPER72HIRESHAMDBL_KEY        =  $00089808;
  214.    SUPER72SUPERHAMDBL_KEY        =  $00089828;
  215.    SUPER72LORESEHBDBL_KEY        =  $00081088;
  216.    SUPER72HIRESEHBDBL_KEY        =  $00089088;
  217.    SUPER72SUPEREHBDBL_KEY        =  $000890a8;
  218.  
  219.  
  220. { These monitors and modes were added for the V39 release. }
  221.  
  222.    DBLNTSC_MONITOR_ID            =  $00091000;
  223.  
  224.    DBLNTSCLORES_KEY              =  $00091000;
  225.    DBLNTSCLORESFF_KEY            =  $00091004;
  226.    DBLNTSCLORESHAM_KEY           =  $00091800;
  227.    DBLNTSCLORESHAMFF_KEY         =  $00091804;
  228.    DBLNTSCLORESEHB_KEY           =  $00091080;
  229.    DBLNTSCLORESEHBFF_KEY         =  $00091084;
  230.    DBLNTSCLORESLACE_KEY          =  $00091005;
  231.    DBLNTSCLORESHAMLACE_KEY       =  $00091805;
  232.    DBLNTSCLORESEHBLACE_KEY       =  $00091085;
  233.    DBLNTSCLORESDPF_KEY           =  $00091400;
  234.    DBLNTSCLORESDPFFF_KEY         =  $00091404;
  235.    DBLNTSCLORESDPFLACE_KEY       =  $00091405;
  236.    DBLNTSCLORESDPF2_KEY          =  $00091440;
  237.    DBLNTSCLORESDPF2FF_KEY        =  $00091444;
  238.    DBLNTSCLORESDPF2LACE_KEY      =  $00091445;
  239.    DBLNTSCHIRES_KEY              =  $00099000;
  240.    DBLNTSCHIRESFF_KEY            =  $00099004;
  241.    DBLNTSCHIRESHAM_KEY           =  $00099800;
  242.    DBLNTSCHIRESHAMFF_KEY         =  $00099804;
  243.    DBLNTSCHIRESLACE_KEY          =  $00099005;
  244.    DBLNTSCHIRESHAMLACE_KEY       =  $00099805;
  245.    DBLNTSCHIRESEHB_KEY           =  $00099080;
  246.    DBLNTSCHIRESEHBFF_KEY         =  $00099084;
  247.    DBLNTSCHIRESEHBLACE_KEY       =  $00099085;
  248.    DBLNTSCHIRESDPF_KEY           =  $00099400;
  249.    DBLNTSCHIRESDPFFF_KEY         =  $00099404;
  250.    DBLNTSCHIRESDPFLACE_KEY       =  $00099405;
  251.    DBLNTSCHIRESDPF2_KEY          =  $00099440;
  252.    DBLNTSCHIRESDPF2FF_KEY        =  $00099444;
  253.    DBLNTSCHIRESDPF2LACE_KEY      =  $00099445;
  254.    DBLNTSCEXTRALORES_KEY         =  $00091200;
  255.    DBLNTSCEXTRALORESHAM_KEY      =  $00091a00;
  256.    DBLNTSCEXTRALORESEHB_KEY      =  $00091280;
  257.    DBLNTSCEXTRALORESDPF_KEY      =  $00091600;
  258.    DBLNTSCEXTRALORESDPF2_KEY     =  $00091640;
  259.    DBLNTSCEXTRALORESFF_KEY       =  $00091204;
  260.    DBLNTSCEXTRALORESHAMFF_KEY    =  $00091a04;
  261.    DBLNTSCEXTRALORESEHBFF_KEY    =  $00091284;
  262.    DBLNTSCEXTRALORESDPFFF_KEY    =  $00091604;
  263.    DBLNTSCEXTRALORESDPF2FF_KEY   =  $00091644;
  264.    DBLNTSCEXTRALORESLACE_KEY     =  $00091205;
  265.    DBLNTSCEXTRALORESHAMLACE_KEY  =  $00091a05;
  266.    DBLNTSCEXTRALORESEHBLACE_KEY  =  $00091285;
  267.    DBLNTSCEXTRALORESDPFLACE_KEY  =  $00091605;
  268.    DBLNTSCEXTRALORESDPF2LACE_KEY =  $00091645;
  269.  
  270.    DBLPAL_MONITOR_ID             =  $000a1000;
  271.  
  272.    DBLPALLORES_KEY               =  $000a1000;
  273.    DBLPALLORESFF_KEY             =  $000a1004;
  274.    DBLPALLORESHAM_KEY            =  $000a1800;
  275.    DBLPALLORESHAMFF_KEY          =  $000a1804;
  276.    DBLPALLORESEHB_KEY            =  $000a1080;
  277.    DBLPALLORESEHBFF_KEY          =  $000a1084;
  278.    DBLPALLORESLACE_KEY           =  $000a1005;
  279.    DBLPALLORESHAMLACE_KEY        =  $000a1805;
  280.    DBLPALLORESEHBLACE_KEY        =  $000a1085;
  281.    DBLPALLORESDPF_KEY            =  $000a1400;
  282.    DBLPALLORESDPFFF_KEY          =  $000a1404;
  283.    DBLPALLORESDPFLACE_KEY        =  $000a1405;
  284.    DBLPALLORESDPF2_KEY           =  $000a1440;
  285.    DBLPALLORESDPF2FF_KEY         =  $000a1444;
  286.    DBLPALLORESDPF2LACE_KEY       =  $000a1445;
  287.    DBLPALHIRES_KEY               =  $000a9000;
  288.    DBLPALHIRESFF_KEY             =  $000a9004;
  289.    DBLPALHIRESHAM_KEY            =  $000a9800;
  290.    DBLPALHIRESHAMFF_KEY          =  $000a9804;
  291.    DBLPALHIRESLACE_KEY           =  $000a9005;
  292.    DBLPALHIRESHAMLACE_KEY        =  $000a9805;
  293.    DBLPALHIRESEHB_KEY            =  $000a9080;
  294.    DBLPALHIRESEHBFF_KEY          =  $000a9084;
  295.    DBLPALHIRESEHBLACE_KEY        =  $000a9085;
  296.    DBLPALHIRESDPF_KEY            =  $000a9400;
  297.    DBLPALHIRESDPFFF_KEY          =  $000a9404;
  298.    DBLPALHIRESDPFLACE_KEY        =  $000a9405;
  299.    DBLPALHIRESDPF2_KEY           =  $000a9440;
  300.    DBLPALHIRESDPF2FF_KEY         =  $000a9444;
  301.    DBLPALHIRESDPF2LACE_KEY       =  $000a9445;
  302.    DBLPALEXTRALORES_KEY          =  $000a1200;
  303.    DBLPALEXTRALORESHAM_KEY       =  $000a1a00;
  304.    DBLPALEXTRALORESEHB_KEY       =  $000a1280;
  305.    DBLPALEXTRALORESDPF_KEY       =  $000a1600;
  306.    DBLPALEXTRALORESDPF2_KEY      =  $000a1640;
  307.    DBLPALEXTRALORESFF_KEY        =  $000a1204;
  308.    DBLPALEXTRALORESHAMFF_KEY     =  $000a1a04;
  309.    DBLPALEXTRALORESEHBFF_KEY     =  $000a1284;
  310.    DBLPALEXTRALORESDPFFF_KEY     =  $000a1604;
  311.    DBLPALEXTRALORESDPF2FF_KEY    =  $000a1644;
  312.    DBLPALEXTRALORESLACE_KEY      =  $000a1205;
  313.    DBLPALEXTRALORESHAMLACE_KEY   =  $000a1a05;
  314.    DBLPALEXTRALORESEHBLACE_KEY   =  $000a1285;
  315.    DBLPALEXTRALORESDPFLACE_KEY   =  $000a1605;
  316.    DBLPALEXTRALORESDPF2LACE_KEY  =  $000a1645;
  317.  
  318.  
  319. { Use these tags for passing to BestModeID() (V39) }
  320.  
  321.    SPECIAL_FLAGS = $100E;
  322.    { Original:
  323.      SPECIAL_FLAGS = DIPF_IS_DUALPF OR DIPF_IS_PF2PRI OR DIPF_IS_HAM OR DIPF_IS_EXTRAHALFBRITE;
  324.      ( Mußte aufgrund eines Fehler in PCQ geändert werden )
  325.    }
  326.  
  327.  
  328.    BIDTAG_DIPFMustHave     = $80000001;      { mask of the DIPF_ flags the ModeID must have }
  329.                                 { Default - NULL }
  330.    BIDTAG_DIPFMustNotHave  = $80000002;      { mask of the DIPF_ flags the ModeID must not have }
  331.                                 { Default - SPECIAL_FLAGS }
  332.    BIDTAG_ViewPort         = $80000003;      { ViewPort for which a ModeID is sought. }
  333.                                 { Default - NULL }
  334.    BIDTAG_NominalWidth     = $80000004;      { \ together make the aspect ratio and }
  335.    BIDTAG_NominalHeight    = $80000005;      { / override the vp->Width/Height. }
  336.                                 { Default - SourceID NominalDimensionInfo,
  337.                                  * or vp->DWidth/Height, or (640 * 200),
  338.                                  * in that preferred order.
  339.                                  }
  340.    BIDTAG_DesiredWidth     = $80000006;      { \ Nominal Width and Height of the }
  341.    BIDTAG_DesiredHeight    = $80000007;      { / returned ModeID. }
  342.                                 { Default - same as Nominal }
  343.    BIDTAG_Depth            = $80000008;      { ModeID must support this depth. }
  344.                                 { Default - vp->RasInfo->BitMap->Depth or 1 }
  345.    BIDTAG_MonitorID        = $80000009;      { ModeID must use this monitor. }
  346.                                 { Default - use best monitor available }
  347.    BIDTAG_SourceID         = $8000000a;      { instead of a ViewPort. }
  348.                                 { Default - VPModeID(vp) if BIDTAG_ViewPort is
  349.                                  * specified, else leave the DIPFMustHave and
  350.                                  * DIPFMustNotHave values untouched.
  351.                                  }
  352.    BIDTAG_RedBits        =  $8000000b;      { \                            }
  353.    BIDTAG_BlueBits       =  $8000000c;      {  > Match up from the database }
  354.    BIDTAG_GreenBits      =  $8000000d;      { /                            }
  355.                                             { Default - 4 }
  356.    BIDTAG_GfxPrivate     =  $8000000e;      { Private }
  357.  
  358.  
  359. FUNCTION BestModeIDA(TagList : Address) : Integer;
  360.     External;
  361.  
  362.  
  363.